package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.UserTreasureBoxPurchasesMapper;
import com.ruoyi.system.domain.UserTreasureBoxPurchases;
import com.ruoyi.system.service.IUserTreasureBoxPurchasesService;

/**
 * 宝箱购买信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-17
 */
@Service
public class UserTreasureBoxPurchasesServiceImpl implements IUserTreasureBoxPurchasesService 
{
    @Autowired
    private UserTreasureBoxPurchasesMapper userTreasureBoxPurchasesMapper;

    /**
     * 查询宝箱购买信息
     * 
     * @param purchaseId 宝箱购买信息主键
     * @return 宝箱购买信息
     */
    @Override
    public UserTreasureBoxPurchases selectUserTreasureBoxPurchasesByPurchaseId(Long purchaseId)
    {
        return userTreasureBoxPurchasesMapper.selectUserTreasureBoxPurchasesByPurchaseId(purchaseId);
    }

    /**
     * 查询宝箱购买信息列表
     * 
     * @param userTreasureBoxPurchases 宝箱购买信息
     * @return 宝箱购买信息
     */
    @Override
    public List<UserTreasureBoxPurchases> selectUserTreasureBoxPurchasesList(UserTreasureBoxPurchases userTreasureBoxPurchases)
    {
        return userTreasureBoxPurchasesMapper.selectUserTreasureBoxPurchasesList(userTreasureBoxPurchases);
    }

    /**
     * 新增宝箱购买信息
     * 
     * @param userTreasureBoxPurchases 宝箱购买信息
     * @return 结果
     */
    @Override
    public int insertUserTreasureBoxPurchases(UserTreasureBoxPurchases userTreasureBoxPurchases)
    {
        return userTreasureBoxPurchasesMapper.insertUserTreasureBoxPurchases(userTreasureBoxPurchases);
    }

    /**
     * 修改宝箱购买信息
     * 
     * @param userTreasureBoxPurchases 宝箱购买信息
     * @return 结果
     */
    @Override
    public int updateUserTreasureBoxPurchases(UserTreasureBoxPurchases userTreasureBoxPurchases)
    {
        return userTreasureBoxPurchasesMapper.updateUserTreasureBoxPurchases(userTreasureBoxPurchases);
    }

    /**
     * 批量删除宝箱购买信息
     * 
     * @param purchaseIds 需要删除的宝箱购买信息主键
     * @return 结果
     */
    @Override
    public int deleteUserTreasureBoxPurchasesByPurchaseIds(Long[] purchaseIds)
    {
        return userTreasureBoxPurchasesMapper.deleteUserTreasureBoxPurchasesByPurchaseIds(purchaseIds);
    }

    /**
     * 删除宝箱购买信息信息
     * 
     * @param purchaseId 宝箱购买信息主键
     * @return 结果
     */
    @Override
    public int deleteUserTreasureBoxPurchasesByPurchaseId(Long purchaseId)
    {
        return userTreasureBoxPurchasesMapper.deleteUserTreasureBoxPurchasesByPurchaseId(purchaseId);
    }
}
